import sys
import pandas as pd
from MainConsolidator import MainConsolidator

if __name__=="__main__":
    try:
        consolidator = MainConsolidator(f"convert_.log",logStream=sys.stdout)
        # consolidator.load_guids("D:\\work\\Укрупнение\\current\\справочники2")
        # for key in consolidator.guids.keys():
        #     print(f"key:{key}")
        #     df:pd.DataFrame = consolidator.guids[key]
        #     df.to_excel(f"D:\\work\\Укрупнение\\current\\справочники4\\{key}.xlsx",index=False)
        consolidator.load_guids_x("D:\\work\\Укрупнение\\current\\справочники4")
        for key in consolidator.guids.keys():
            print(f"key:{key}")
            print(consolidator.guids[key])
    except Exception as exp:
        print(f"error: {exp}")